x11: Fix debug code
authorBenjamin Otte <otte@redhat.com>
Mon, 27 Sep 2010 15:33:39 +0000 (17:33 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 27 Sep 2010 15:39:51 +0000 (17:39 +0200)
With recent changes, nobody compiled with debug enabled. Fix that.

gdk/x11/gdkvisual-x11.c

index a4d639d03ab2303d0981b3cc0efe48d6759ac6e3..b3fef17731ea55f62be05e38bc3bd7e861cc9b0c 100644 (file)
@@ -279,10 +279,22 @@ _gdk_visual_init (GdkScreen *screen)
 
 #ifdef G_ENABLE_DEBUG 
   if (_gdk_debug_flags & GDK_DEBUG_MISC)
-    for (i = 0; i < nvisuals; i++)
-      g_message ("visual: %s: %d",
-                visual_names[visuals[i]->visual.type],
-                visuals[i]->visual.depth);
+    {
+      static const gchar *const visual_names[] =
+      {
+        "static gray",
+        "grayscale",
+        "static color",
+        "pseudo color",
+        "true color",
+        "direct color",
+      };
+
+      for (i = 0; i < nvisuals; i++)
+        g_message ("visual: %s: %d",
+                   visual_names[visuals[i]->type],
+                   visuals[i]->depth);
+    }
 #endif /* G_ENABLE_DEBUG */
 
   screen_x11->navailable_depths = 0;